package com.sun.service.serviceImpl;

import com.sun.mapper.StudentMapper;
import com.sun.service.LoginService;
import com.sun.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author sun
 * @date 2020/11/5 - 14:45
 */
@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public User login(User user) {
        User user1 = studentMapper.login(user);
        if (null!=user1){
            System.out.println("=====登录成功========"+user1.toString());
            return user1;
        }
        return null;
    }
}
